package org.whz.configuration;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author whz-dell
 */
@Data
@ConfigurationProperties(prefix = HazelcastProperties.PREFIX)
public class HazelcastProperties {
    public static final String PREFIX = "common.hazelcast";

    private Map<String, ServerConfig> configs = new ConcurrentHashMap<>();
    /**
     * 是否是集群部署开关
     */
    private boolean enableCluster = true;
    /**
     * 应用名称,同spring.application.name
     */
    private String appName;


    @Data
    public static class ServerConfig {
        private int backUpCount = 5;

        private int maxCount = 100;

        private int batchCount = 200;
    }
}